#ifndef VSMORPHSEQUENCEFUNC_H
#define VSMORPHSEQUENCEFUNC_H
#include "VSMorphFunction.h"
namespace VSEngine2
{
	class VSStream;
	class VSGRAPHIC_API VSMorphSequenceFunc : public VSMorphFunction
	{
		//RTTI
		DECLARE_RTTI;
		//PRIORITY
		
	public:
		virtual ~VSMorphSequenceFunc();
		virtual bool UpdateEx(double dAppTime);
		virtual void UpdateVertexDate(unsigned int GeometryIndex,unsigned int uiVertexIndex);
		VSMorphSequenceFunc(const VSUsedName & ShowName,VSMorphTree * pMorphTree);
		void SetMorph(VSString MorphName);
	protected:
		VSMorphSequenceFunc();
	protected:
		VSString m_MorphName;

	public:
		static bool RegisterMainFactory();
		
		virtual unsigned int DiskUse()const;

		virtual bool Save(VSStream & rStream,unsigned int &iSaveUse)const;
		virtual bool Load(VSStream & rStream,unsigned int &iSaveUse);
		virtual bool Link(VSStream & rStream);

		virtual bool Register(VSStream & rStream)const;
	private:
		static bool InitialClassFactory();	
		static VSObject * FactoryFunc();
		static bool ms_bRegisterMainFactory;
	public:
		virtual bool Clone(const VSObject *pObject,unsigned int uiType);

	};
	typedef VSPointer<VSMorphSequenceFunc> VSMorphSequenceFuncPtr;
}
#endif